package com.kongmou.Springmvc.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.request.async.DeferredResult;

import com.kongmou.Springmvc.service.PushService;

@Controller
public class AsyncController {
	@Resource
	private PushService pushService;

	@RequestMapping("/defer")
	@ResponseBody
	public DeferredResult<String> deferredCall() {
		return pushService.getDeferreResult();
	}

}
